home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / websrvcs / nsISOAPTransport.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  8KB  |  192 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsISOAPTransport.idl
  3.  */
  4.  
  5. #ifndef __gen_nsISOAPTransport_h__
  6. #define __gen_nsISOAPTransport_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsISOAPTransportListener; /* forward declaration */
  18.  
  19. class nsISOAPCall; /* forward declaration */
  20.  
  21. class nsISOAPResponse; /* forward declaration */
  22.  
  23. class nsISOAPResponseListener; /* forward declaration */
  24.  
  25. class nsISOAPCallCompletion; /* forward declaration */
  26.  
  27.  
  28. /* starting interface:    nsISOAPTransport */
  29. #define NS_ISOAPTRANSPORT_IID_STR "99ec6695-535f-11d4-9a58-000064657374"
  30.  
  31. #define NS_ISOAPTRANSPORT_IID \
  32.   {0x99ec6695, 0x535f, 0x11d4, \
  33.     { 0x9a, 0x58, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }}
  34.  
  35. class NS_NO_VTABLE nsISOAPTransport : public nsISupports {
  36.  public: 
  37.  
  38.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISOAPTRANSPORT_IID)
  39.  
  40.   /**
  41.    * Send the specified message to the specified destination.
  42.    * This will fail if synchronous calls are not supported or if there is any
  43.    * failure in the actual message exchange.  Failure of the call itself will be
  44.    * contained in the response.
  45.    *
  46.    * @param aCall Actual message to be sent.
  47.    *
  48.    * @param aResponse Message to be recieved.  Calling synchronously assumes that 
  49.    *   exactly one response is expected.
  50.    */
  51.   /* void syncCall (in nsISOAPCall aCall, in nsISOAPResponse aResponse); */
  52.   NS_IMETHOD SyncCall(nsISOAPCall *aCall, nsISOAPResponse *aResponse) = 0;
  53.  
  54.   /**
  55.    * Send the specified message to the specified destination synchronously waiting 
  56.    * for completion and any response.
  57.    * This will fail if there is any failure in the setup of the message exchange.
  58.    * Later errors will only be known through the response listener.  Failures of the
  59.    * call itself will be contained in the response passed to the response listener.
  60.    *
  61.    * @param aCall Actual message to be sent.
  62.    *
  63.    * @param aListener Handler to be invoked (single threaded) as each response is 
  64.    *  received and finally with null.  If specified as null, no responses are returned.
  65.    *
  66.    * @param response Message to recieve response and be handled by listener.  May be 
  67.    *   null if listener is null.
  68.    */
  69.   /* nsISOAPCallCompletion asyncCall (in nsISOAPCall aCall, in nsISOAPResponseListener aListener, in nsISOAPResponse aResponse); */
  70.   NS_IMETHOD AsyncCall(nsISOAPCall *aCall, nsISOAPResponseListener *aListener, nsISOAPResponse *aResponse, nsISOAPCallCompletion **_retval) = 0;
  71.  
  72.   /**
  73.    * Add listener for unsolicited messages arriving on the transport.  Listeners
  74.    *  are provided with the opportunity to accept and process messages.  Typically
  75.    *  a listener will be a service dispatcher.  Listeners will be invoked in the
  76.    *  reverse order of declaration, allowing more local service dispatchers to
  77.    *  temporarily override permanent service dispatchers.  This will fail if the
  78.    *  desired listener was already added to the transport with the specified
  79.    *  capture flag or if the transport does not support incoming messages.
  80.    *
  81.    * @param aListener The listener to recieve unsolicited messages from the
  82.    *   transport.
  83.    *
  84.    * @param aCapture True if the listener should capture the message before
  85.    *   later-declared services.
  86.    */
  87.   /* void addListener (in nsISOAPTransportListener aListener, in boolean aCapture); */
  88.   NS_IMETHOD AddListener(nsISOAPTransportListener *aListener, PRBool aCapture) = 0;
  89.  
  90.   /**
  91.    * Remove listener for unsolicited messages arriving on the transport.  This
  92.    *  will fail if the specified listener was not added with the specified
  93.    *  capture setting.
  94.    *
  95.    * @param aListener The listener to stop from recieving unsolicited messages 
  96.    *  from the transport.
  97.    *
  98.    * @param aCapture True if the listener was added to capture the message before
  99.    *   later-declared services (must be specified to remove, since a listener
  100.    *   may be registered as both).
  101.    */
  102.   /* void removeListener (in nsISOAPTransportListener aListener, in boolean aCapture); */
  103.   NS_IMETHOD RemoveListener(nsISOAPTransportListener *aListener, PRBool aCapture) = 0;
  104.  
  105. };
  106.  
  107. /* Use this macro when declaring classes that implement this interface. */
  108. #define NS_DECL_NSISOAPTRANSPORT \
  109.   NS_IMETHOD SyncCall(nsISOAPCall *aCall, nsISOAPResponse *aResponse); \
  110.   NS_IMETHOD AsyncCall(nsISOAPCall *aCall, nsISOAPResponseListener *aListener, nsISOAPResponse *aResponse, nsISOAPCallCompletion **_retval); \
  111.   NS_IMETHOD AddListener(nsISOAPTransportListener *aListener, PRBool aCapture); \
  112.   NS_IMETHOD RemoveListener(nsISOAPTransportListener *aListener, PRBool aCapture); 
  113.  
  114. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  115. #define NS_FORWARD_NSISOAPTRANSPORT(_to) \
  116.   NS_IMETHOD SyncCall(nsISOAPCall *aCall, nsISOAPResponse *aResponse) { return _to SyncCall(aCall, aResponse); } \
  117.   NS_IMETHOD AsyncCall(nsISOAPCall *aCall, nsISOAPResponseListener *aListener, nsISOAPResponse *aResponse, nsISOAPCallCompletion **_retval) { return _to AsyncCall(aCall, aListener, aResponse, _retval); } \
  118.   NS_IMETHOD AddListener(nsISOAPTransportListener *aListener, PRBool aCapture) { return _to AddListener(aListener, aCapture); } \
  119.   NS_IMETHOD RemoveListener(nsISOAPTransportListener *aListener, PRBool aCapture) { return _to RemoveListener(aListener, aCapture); } 
  120.  
  121. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  122. #define NS_FORWARD_SAFE_NSISOAPTRANSPORT(_to) \
  123.   NS_IMETHOD SyncCall(nsISOAPCall *aCall, nsISOAPResponse *aResponse) { return !_to ? NS_ERROR_NULL_POINTER : _to->SyncCall(aCall, aResponse); } \
  124.   NS_IMETHOD AsyncCall(nsISOAPCall *aCall, nsISOAPResponseListener *aListener, nsISOAPResponse *aResponse, nsISOAPCallCompletion **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncCall(aCall, aListener, aResponse, _retval); } \
  125.   NS_IMETHOD AddListener(nsISOAPTransportListener *aListener, PRBool aCapture) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddListener(aListener, aCapture); } \
  126.   NS_IMETHOD RemoveListener(nsISOAPTransportListener *aListener, PRBool aCapture) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveListener(aListener, aCapture); } 
  127.  
  128. #if 0
  129. /* Use the code below as a template for the implementation class for this interface. */
  130.  
  131. /* Header file */
  132. class nsSOAPTransport : public nsISOAPTransport
  133. {
  134. public:
  135.   NS_DECL_ISUPPORTS
  136.   NS_DECL_NSISOAPTRANSPORT
  137.  
  138.   nsSOAPTransport();
  139.  
  140. private:
  141.   ~nsSOAPTransport();
  142.  
  143. protected:
  144.   /* additional members */
  145. };
  146.  
  147. /* Implementation file */
  148. NS_IMPL_ISUPPORTS1(nsSOAPTransport, nsISOAPTransport)
  149.  
  150. nsSOAPTransport::nsSOAPTransport()
  151. {
  152.   /* member initializers and constructor code */
  153. }
  154.  
  155. nsSOAPTransport::~nsSOAPTransport()
  156. {
  157.   /* destructor code */
  158. }
  159.  
  160. /* void syncCall (in nsISOAPCall aCall, in nsISOAPResponse aResponse); */
  161. NS_IMETHODIMP nsSOAPTransport::SyncCall(nsISOAPCall *aCall, nsISOAPResponse *aResponse)
  162. {
  163.     return NS_ERROR_NOT_IMPLEMENTED;
  164. }
  165.  
  166. /* nsISOAPCallCompletion asyncCall (in nsISOAPCall aCall, in nsISOAPResponseListener aListener, in nsISOAPResponse aResponse); */
  167. NS_IMETHODIMP nsSOAPTransport::AsyncCall(nsISOAPCall *aCall, nsISOAPResponseListener *aListener, nsISOAPResponse *aResponse, nsISOAPCallCompletion **_retval)
  168. {
  169.     return NS_ERROR_NOT_IMPLEMENTED;
  170. }
  171.  
  172. /* void addListener (in nsISOAPTransportListener aListener, in boolean aCapture); */
  173. NS_IMETHODIMP nsSOAPTransport::AddListener(nsISOAPTransportListener *aListener, PRBool aCapture)
  174. {
  175.     return NS_ERROR_NOT_IMPLEMENTED;
  176. }
  177.  
  178. /* void removeListener (in nsISOAPTransportListener aListener, in boolean aCapture); */
  179. NS_IMETHODIMP nsSOAPTransport::RemoveListener(nsISOAPTransportListener *aListener, PRBool aCapture)
  180. {
  181.     return NS_ERROR_NOT_IMPLEMENTED;
  182. }
  183.  
  184. /* End of implementation class template. */
  185. #endif
  186.  
  187. #define NS_SOAPTRANSPORT_CONTRACTID  \
  188. "@mozilla.org/xmlextras/soap/transport;1"
  189. #define NS_SOAPTRANSPORT_CONTRACTID_PREFIX   NS_SOAPTRANSPORT_CONTRACTID "?protocol="
  190.  
  191. #endif /* __gen_nsISOAPTransport_h__ */
  192.